Why is the max() function returning an error in my GUI code for finding frequent visitors

visit shbcf.ru